<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>robotide.run.process</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="robotide-module.html">Package&nbsp;robotide</a> ::
        <a href="robotide.run-module.html">Package&nbsp;run</a> ::
        Module&nbsp;process
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="robotide.run.process-module.html">Module robotide.run.process</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#  Copyright 2008-2009 Nokia Siemens Networks Oyj</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment">#  Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-comment">#  you may not use this file except in compliance with the License.</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-comment">#  You may obtain a copy of the License at</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-comment">#      http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-comment">#  Unless required by applicable law or agreed to in writing, software</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-comment">#  distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-comment">#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment">#  See the License for the specific language governing permissions and</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment">#  limitations under the License.</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">time</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">tempfile</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">subprocess</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"> </tt>
<a name="Process"></a><div id="Process-def"><a name="L21"></a><tt class="py-lineno">21</tt> <a class="py-toggle" href="#" id="Process-toggle" onclick="return toggle('Process');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html">Process</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Process-expanded"><a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"> </tt>
<a name="Process.__init__"></a><div id="Process.__init__-def"><a name="L23"></a><tt class="py-lineno">23</tt> <a class="py-toggle" href="#" id="Process.__init__-toggle" onclick="return toggle('Process.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">command</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.__init__-expanded"><a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_command</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse_command</tt><tt class="py-op">(</tt><tt class="py-name">command</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"> </tt>
<a name="Process._parse_command"></a><div id="Process._parse_command-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="Process._parse_command-toggle" onclick="return toggle('Process._parse_command');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#_parse_command">_parse_command</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">command</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process._parse_command-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process._parse_command-expanded"><a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">command</tt><tt class="py-op">,</tt> <tt class="py-name">basestring</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-op">[</tt> <tt class="py-name">val</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'&lt;SPACE&gt;'</tt><tt class="py-op">,</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">val</tt> <tt class="py-keyword">in</tt> <tt class="py-name">command</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">]</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">command</tt> </tt>
</div><a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="Process.start"></a><div id="Process.start-def"><a name="L33"></a><tt class="py-lineno">33</tt> <a class="py-toggle" href="#" id="Process.start-toggle" onclick="return toggle('Process.start');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#start">start</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.start-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.start-expanded"><a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_fd</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_path</tt> <tt class="py-op">=</tt> \ </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">                        <tt class="py-name">tempfile</tt><tt class="py-op">.</tt><tt class="py-name">mkstemp</tt><tt class="py-op">(</tt><tt class="py-name">prefix</tt><tt class="py-op">=</tt><tt class="py-string">'rfproc_'</tt><tt class="py-op">,</tt> <tt class="py-name">suffix</tt><tt class="py-op">=</tt><tt class="py-string">'.txt'</tt><tt class="py-op">,</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">                                         <tt id="link-0" class="py-name" targets="Variable robotide.editor.tags.AddTagBoxProperties.text=robotide.editor.tags.AddTagBoxProperties-class.html#text"><a title="robotide.editor.tags.AddTagBoxProperties.text" class="py-name" href="#" onclick="return doclink('link-0', 'text', 'link-0');">text</a></tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_file</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_path</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_command</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt> <tt class="py-op">=</tt> <tt class="py-string">'The command is missing from this run configuration.'</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt> <tt class="py-op">=</tt> <tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">Popen</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_command</tt><tt class="py-op">,</tt> <tt class="py-name">stdout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_fd</tt><tt class="py-op">,</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">                                             <tt class="py-name">stderr</tt><tt class="py-op">=</tt><tt class="py-name">subprocess</tt><tt class="py-op">.</tt><tt class="py-name">STDOUT</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">OSError</tt><tt class="py-op">,</tt> <tt class="py-name">err</tt><tt class="py-op">:</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">err</tt><tt class="py-op">)</tt> </tt>
</div><a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"> </tt>
<a name="Process.is_finished"></a><div id="Process.is_finished-def"><a name="L47"></a><tt class="py-lineno">47</tt> <a class="py-toggle" href="#" id="Process.is_finished-toggle" onclick="return toggle('Process.is_finished');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#is_finished">is_finished</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.is_finished-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.is_finished-expanded"><a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Method robotide.contrib.testrunner.asyncproc.Process.poll()=robotide.contrib.testrunner.asyncproc.Process-class.html#poll"><a title="robotide.contrib.testrunner.asyncproc.Process.poll" class="py-name" href="#" onclick="return doclink('link-1', 'poll', 'link-1');">poll</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt> </tt>
</div><a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"> </tt>
<a name="Process.stop"></a><div id="Process.stop-def"><a name="L50"></a><tt class="py-lineno">50</tt> <a class="py-toggle" href="#" id="Process.stop-toggle" onclick="return toggle('Process.stop');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#stop">stop</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.stop-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.stop-expanded"><a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method robotide.contrib.testrunner.asyncproc.Process.kill()=robotide.contrib.testrunner.asyncproc.Process-class.html#kill"><a title="robotide.contrib.testrunner.asyncproc.Process.kill" class="py-name" href="#" onclick="return doclink('link-2', 'kill', 'link-2');">kill</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt>
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">(</tt><tt class="py-string">'Stopping process is possible only with '</tt> </tt>
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">                                 <tt class="py-string">'Python 2.6 or newer'</tt><tt class="py-op">)</tt> </tt>
</div><a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line"> </tt>
<a name="Process.wait"></a><div id="Process.wait-def"><a name="L57"></a><tt class="py-lineno">57</tt> <a class="py-toggle" href="#" id="Process.wait-toggle" onclick="return toggle('Process.wait');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#wait">wait</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.wait-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.wait-expanded"><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method robotide.contrib.testrunner.asyncproc.Process.wait()=robotide.contrib.testrunner.asyncproc.Process-class.html#wait,Method robotide.run.process.Process.wait()=robotide.run.process.Process-class.html#wait"><a title="robotide.contrib.testrunner.asyncproc.Process.wait
robotide.run.process.Process.wait" class="py-name" href="#" onclick="return doclink('link-3', 'wait', 'link-3');">wait</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"> </tt>
<a name="Process.get_output"></a><div id="Process.get_output-def"><a name="L61"></a><tt class="py-lineno">61</tt> <a class="py-toggle" href="#" id="Process.get_output-toggle" onclick="return toggle('Process.get_output');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#get_output">get_output</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">wait_until_finished</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process.get_output-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process.get_output-expanded"><a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">        <tt class="py-docstring">"""Returns the output produced by the process.</tt> </tt>
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"><tt class="py-docstring">        If ``wait_until_finished`` is True, blocks until the process is</tt> </tt>
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line"><tt class="py-docstring">        finished and returns all output. Otherwise the currently available</tt> </tt>
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line"><tt class="py-docstring">        output is returned immediately.</tt> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line"><tt class="py-docstring">        Currently available output depends on buffering and might not include</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line"><tt class="py-docstring">        everything that has been written by the process.</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt><tt class="py-op">:</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_close_outputs</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_error</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">wait_until_finished</tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="robotide.contrib.testrunner.asyncproc.Process.wait
robotide.run.process.Process.wait" class="py-name" href="#" onclick="return doclink('link-4', 'wait', 'link-3');">wait</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_file</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method robotide.contrib.testrunner.asyncproc.Process.read()=robotide.contrib.testrunner.asyncproc.Process-class.html#read"><a title="robotide.contrib.testrunner.asyncproc.Process.read" class="py-name" href="#" onclick="return doclink('link-5', 'read', 'link-5');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno">77</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method robotide.run.process.Process.is_finished()=robotide.run.process.Process-class.html#is_finished"><a title="robotide.run.process.Process.is_finished" class="py-name" href="#" onclick="return doclink('link-6', 'is_finished', 'link-6');">is_finished</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_close_outputs</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno">79</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
</div><a name="L80"></a><tt class="py-lineno">80</tt>  <tt class="py-line"> </tt>
<a name="Process._close_outputs"></a><div id="Process._close_outputs-def"><a name="L81"></a><tt class="py-lineno">81</tt> <a class="py-toggle" href="#" id="Process._close_outputs-toggle" onclick="return toggle('Process._close_outputs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#_close_outputs">_close_outputs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process._close_outputs-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process._close_outputs-expanded"><a name="L82"></a><tt class="py-lineno">82</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_file</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method robotide.contrib.testrunner.SocketListener.SocketListener.close()=robotide.contrib.testrunner.SocketListener.SocketListener-class.html#close,Method robotide.editor.editors.ResourceFileEditor.close()=robotide.editor.editors.ResourceFileEditor-class.html#close,Method robotide.editor.editors.SettingEditor.close()=robotide.editor.editors.SettingEditor-class.html#close,Method robotide.editor.editors.Settings.close()=robotide.editor.editors.Settings-class.html#close,Method robotide.editor.editors.TagsEditor.close()=robotide.editor.editors.TagsEditor-class.html#close,Method robotide.editor.editors.TestCaseEditor.close()=robotide.editor.editors.TestCaseEditor-class.html#close,Method robotide.editor.editors.VariablesListEditor.close()=robotide.editor.editors.VariablesListEditor-class.html#close,Method robotide.editor.editors.WelcomePage.close()=robotide.editor.editors.WelcomePage-class.html#close,Method robotide.editor.gridcolorizer.Colorizer.close()=robotide.editor.gridcolorizer.Colorizer-class.html#close,Method robotide.editor.kweditor.KeywordEditor.close()=robotide.editor.kweditor.KeywordEditor-class.html#close,Method robotide.editor.tags.TagBox.close()=robotide.editor.tags.TagBox-class.html#close,Method robotide.editor.tags.TagsDisplay.close()=robotide.editor.tags.TagsDisplay-class.html#close,Method robotide.utils.components.RideHtmlWindow.close()=robotide.utils.components.RideHtmlWindow-class.html#close,Method robotide.writer.writer.HtmlFileWriter.close()=robotide.writer.writer.HtmlFileWriter-class.html#close"><a title="robotide.contrib.testrunner.SocketListener.SocketListener.close
robotide.editor.editors.ResourceFileEditor.close
robotide.editor.editors.SettingEditor.close
robotide.editor.editors.Settings.close
robotide.editor.editors.TagsEditor.close
robotide.editor.editors.TestCaseEditor.close
robotide.editor.editors.VariablesListEditor.close
robotide.editor.editors.WelcomePage.close
robotide.editor.gridcolorizer.Colorizer.close
robotide.editor.kweditor.KeywordEditor.close
robotide.editor.tags.TagBox.close
robotide.editor.tags.TagsDisplay.close
robotide.utils.components.RideHtmlWindow.close
robotide.writer.writer.HtmlFileWriter.close" class="py-name" href="#" onclick="return doclink('link-7', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno">83</tt>  <tt class="py-line">        <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="robotide.contrib.testrunner.SocketListener.SocketListener.close
robotide.editor.editors.ResourceFileEditor.close
robotide.editor.editors.SettingEditor.close
robotide.editor.editors.Settings.close
robotide.editor.editors.TagsEditor.close
robotide.editor.editors.TestCaseEditor.close
robotide.editor.editors.VariablesListEditor.close
robotide.editor.editors.WelcomePage.close
robotide.editor.gridcolorizer.Colorizer.close
robotide.editor.kweditor.KeywordEditor.close
robotide.editor.tags.TagBox.close
robotide.editor.tags.TagsDisplay.close
robotide.utils.components.RideHtmlWindow.close
robotide.writer.writer.HtmlFileWriter.close" class="py-name" href="#" onclick="return doclink('link-8', 'close', 'link-7');">close</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_fd</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno">84</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_remove_tempfile</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L85"></a><tt class="py-lineno">85</tt>  <tt class="py-line"> </tt>
<a name="Process._remove_tempfile"></a><div id="Process._remove_tempfile-def"><a name="L86"></a><tt class="py-lineno">86</tt> <a class="py-toggle" href="#" id="Process._remove_tempfile-toggle" onclick="return toggle('Process._remove_tempfile');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="robotide.run.process.Process-class.html#_remove_tempfile">_remove_tempfile</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">attempts</tt><tt class="py-op">=</tt><tt class="py-number">10</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Process._remove_tempfile-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Process._remove_tempfile-expanded"><a name="L87"></a><tt class="py-lineno">87</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno">88</tt>  <tt class="py-line">            <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method robotide.controller.filecontrollers.ResourceFileController.remove()=robotide.controller.filecontrollers.ResourceFileController-class.html#remove,Method robotide.controller.filecontrollers.TestCaseFileController.remove()=robotide.controller.filecontrollers.TestCaseFileController-class.html#remove,Method robotide.controller.filecontrollers.TestDataDirectoryController.remove()=robotide.controller.filecontrollers.TestDataDirectoryController-class.html#remove,Method robotide.controller.stepcontrollers.ForLoopStepController.remove()=robotide.controller.stepcontrollers.ForLoopStepController-class.html#remove,Method robotide.controller.stepcontrollers.IntendedStepController.remove()=robotide.controller.stepcontrollers.IntendedStepController-class.html#remove,Method robotide.controller.stepcontrollers.StepController.remove()=robotide.controller.stepcontrollers.StepController-class.html#remove,Method robotide.ui.actiontriggers.ActionDelegator.remove()=robotide.ui.actiontriggers.ActionDelegator-class.html#remove,Method robotide.ui.tree.VariableHandler.remove()=robotide.ui.tree.VariableHandler-class.html#remove"><a title="robotide.controller.filecontrollers.ResourceFileController.remove
robotide.controller.filecontrollers.TestCaseFileController.remove
robotide.controller.filecontrollers.TestDataDirectoryController.remove
robotide.controller.stepcontrollers.ForLoopStepController.remove
robotide.controller.stepcontrollers.IntendedStepController.remove
robotide.controller.stepcontrollers.StepController.remove
robotide.ui.actiontriggers.ActionDelegator.remove
robotide.ui.tree.VariableHandler.remove" class="py-name" href="#" onclick="return doclink('link-9', 'remove', 'link-9');">remove</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_out_path</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno">89</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">OSError</tt><tt class="py-op">:</tt> </tt>
<a name="L90"></a><tt class="py-lineno">90</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">attempts</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno">91</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> </tt>
<a name="L92"></a><tt class="py-lineno">92</tt>  <tt class="py-line">            <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno">93</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_remove_tempfile</tt><tt class="py-op">(</tt><tt class="py-name">attempts</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L94"></a><tt class="py-lineno">94</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Apr 13 15:09:56 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
